const SET_USER = 'SET_USER'

const defaultState = {
	isAuth: false,
}

export default function userReducer(state = defaultState, action) {
	switch (action.type) {
		case SET_USER:
			return {
				...state,
				isAuth: true,
			}
		default:
			return state
	}
}

export const setUser = user => ({ type: SET_USER })
